class Student {
    public String name;
    public int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
void show() {
        System.out.println("name:"+name+" "+"age:"+age);
    }
}

class Undergraduate extends Student{
    public String degree;

    public Undergraduate(String name,int age,String degree) {
        super(name,age);
        this.degree = degree;
    }
    public void show() {
        System.out.println("name:"+super.name+" "+"age:"+super.age+" "+"degree:"+degree);
    }
}
public class Stu {
    public static void main(String[] args) {
        Student s1 = new Student("zhangsan",16);
        s1.show();
        Undergraduate s2 = new Undergraduate("lisi",20,"bechalor");
        s2.show();
    }
}
